package com.wjk.feigninstance;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("micro-service-client")
@RequestMapping("/say")
public interface MicroServiceClientSayhello {

	/**
	 *  1.springboot 启动类 添加 EnableFeignClient 的注解
	 *  
	 *  2.   创建feign 接口 ，并添加FeignClient 注解
	 *  
	 *  3. 在控制类中注入即可使用 
	 * */
	@GetMapping("hello/{name}")
	public String hello(@PathVariable(name="name")String name);
}
